<html>
<head><meta charset="utf-8"><title>2021-01-25 Meeting · project-portable-simd · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/index.html">project-portable-simd</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html">2021-01-25 Meeting</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="223958635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223958635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223958635">(Jan 25 2021 at 20:56)</a>:</h4>
<p>Hello everyone! Are we here? 'cause I sure wasn't last week! <span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="223958735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223958735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223958735">(Jan 25 2021 at 20:56)</a>:</h4>
<p>I'm busy but should be able to pop in around half an hour?</p>



<a name="223958774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223958774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223958774">(Jan 25 2021 at 20:57)</a>:</h4>
<p>I'll spend the next 30min straightening out my brain then! ( just kidding, it will never be straight, it recurs too often. )</p>



<a name="223959238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223959238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223959238">(Jan 25 2021 at 21:00)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span> There is your answer! Not now, but in 30.<br>
ping <span class="user-mention" data-user-id="224471">@Lokathor</span> <span class="user-mention" data-user-id="204346">@Ashley Mannix</span></p>



<a name="223960827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223960827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223960827">(Jan 25 2021 at 21:11)</a>:</h4>
<p>I should be around</p>



<a name="223961353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223961353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223961353">(Jan 25 2021 at 21:15)</a>:</h4>
<p>Does the link get posted here?</p>



<a name="223962168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223962168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223962168">(Jan 25 2021 at 21:22)</a>:</h4>
<p>You mean the hackmd?</p>



<a name="223962321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223962321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223962321">(Jan 25 2021 at 21:23)</a>:</h4>
<p>Oh, perhaps I misunderstood "meeting" as "everyone joins a video call at a designated time" but perhaps people mean they will all be here in chat typing away.</p>



<a name="223962359"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223962359" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223962359">(Jan 25 2021 at 21:24)</a>:</h4>
<p>Thus asking for a link to join said video call meeting.</p>



<a name="223962456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223962456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223962456">(Jan 25 2021 at 21:24)</a>:</h4>
<p>It's just "we all show up to type in the topic at the same time."</p>



<a name="223962556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223962556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223962556">(Jan 25 2021 at 21:25)</a>:</h4>
<p>Gotcha. Thanks.</p>



<a name="223962827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223962827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223962827">(Jan 25 2021 at 21:27)</a>:</h4>
<p>We discussed that but I expressed a preference for text precisely because it can be reviewed later by uh, people who miss the meeting. <strong>cough</strong></p>



<a name="223963415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223963415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223963415">(Jan 25 2021 at 21:31)</a>:</h4>
<p>Also makes it easier if it doesn't require rigidly dedicated quiet spacetime since lots of people would be in kind of awkward positions with respect to attending the meeting-time if it was that.</p>
<p>And speaking of, hello everyone!</p>



<a name="223963659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223963659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223963659">(Jan 25 2021 at 21:33)</a>:</h4>
<p>I spent basically every waking moment of last week either venting steam or doing things that involve overheating, so I haven't really gotten caught up with things yet. Where are we at?</p>



<a name="223963803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223963803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223963803">(Jan 25 2021 at 21:34)</a>:</h4>
<p>It seems we last left off with<br>
<span class="user-mention silent" data-user-id="204346">Ashley Mannix</span> <a href="#narrow/stream/257879-project-portable-simd/topic/regular.20meeting.2020201-01-18.2F19/near/223169491">said</a>:</p>
<blockquote>
<p>So next steps are:</p>
<ul>
<li>Add a power of 2 restriction to repr(simd) lane widths</li>
<li>Merge in the mega test PR</li>
<li>See if we can wrap up the mask API a little more</li>
<li>Design shuffles</li>
<li>Submodule into nightly</li>
</ul>
<p>How does that look?</p>
</blockquote>



<a name="223963851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223963851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223963851">(Jan 25 2021 at 21:34)</a>:</h4>
<p>That's still roughly where we are</p>



<a name="223963905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223963905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223963905">(Jan 25 2021 at 21:35)</a>:</h4>
<p>I added the power of two restrictions to my rustc PR, but that still needs to be merged</p>



<a name="223963910"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223963910" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223963910">(Jan 25 2021 at 21:35)</a>:</h4>
<p>(deleted)</p>



<a name="223963941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223963941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223963941">(Jan 25 2021 at 21:35)</a>:</h4>
<p>And probably needs to wait on crater <span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span></p>



<a name="223964262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223964262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223964262">(Jan 25 2021 at 21:38)</a>:</h4>
<p>if it's a crater run, it might be done soon or it might take a while, depending on the queue. We know the first part of the changes are good, so is there a reason we need to wait on crater specifically?</p>



<a name="223964501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223964501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223964501">(Jan 25 2021 at 21:40)</a>:</h4>
<p>mega test PR?</p>



<a name="223964677"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223964677" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223964677">(Jan 25 2021 at 21:42)</a>:</h4>
<p>No one has triggered crater yet, but the PR introduces a bunch of breaking changes for #repr(simd) so we should make sure we aren't hitting anything important</p>



<a name="223964715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223964715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223964715">(Jan 25 2021 at 21:42)</a>:</h4>
<p>hm, so we'd have to crater even if we split things up? fair enough</p>



<a name="223964857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223964857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223964857">(Jan 25 2021 at 21:44)</a>:</h4>
<p>So the "mega test PR" is that one?</p>



<a name="223964984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223964984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223964984">(Jan 25 2021 at 21:45)</a>:</h4>
<p>And it looks like most of the remaining issue is designing our first draft for shuffles.</p>



<a name="223965285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223965285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223965285">(Jan 25 2021 at 21:47)</a>:</h4>
<p>No, the mega test PR is just my branch with a ton of proptests</p>



<a name="223965347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223965347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223965347">(Jan 25 2021 at 21:48)</a>:</h4>
<p>Which for now only works with my branch of rustc</p>



<a name="223965371"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223965371" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223965371">(Jan 25 2021 at 21:48)</a>:</h4>
<p>ohhh.</p>



<a name="223965395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223965395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223965395">(Jan 25 2021 at 21:48)</a>:</h4>
<p>And yeah, shuffles and masks are completely independent</p>



<a name="223965889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223965889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223965889">(Jan 25 2021 at 21:53)</a>:</h4>
<p>so the simd_shuffle API is</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="n">simd_shuffle</span><span class="p">(</span><span class="n">v1</span>: <span class="nc">S</span><span class="p">,</span><span class="w"> </span><span class="n">v2</span>: <span class="nc">S</span><span class="p">,</span><span class="w"> </span><span class="n">arr</span>: <span class="nc">const</span><span class="w"> </span><span class="p">[</span><span class="n">X</span><span class="p">;</span><span class="w"> </span><span class="n">Y</span><span class="p">])</span><span class="w"> </span>-&gt; <span class="nc">S</span><span class="w"></span>
</code></pre></div>
<p>because it was hacked in using exceptions,<br>
but a version of that with const generics looks more like</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="n">simd_shuffle</span><span class="o">&lt;</span><span class="p">[</span><span class="n">X</span><span class="p">;</span><span class="w"> </span><span class="n">Y</span><span class="p">]</span><span class="o">&gt;</span><span class="p">(</span><span class="n">v1</span>: <span class="nc">S</span><span class="p">,</span><span class="w"> </span><span class="n">v2</span>: <span class="nc">S</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">S</span><span class="w"></span>
</code></pre></div>
<p>and as a method it could look like, in usage</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="n">v1</span><span class="p">.</span><span class="n">shuffle</span><span class="o">&lt;</span><span class="p">[</span><span class="n">X</span><span class="p">;</span><span class="w"> </span><span class="n">Y</span><span class="p">]</span><span class="o">&gt;</span><span class="p">(</span><span class="n">v2</span><span class="p">)</span><span class="w"></span>
</code></pre></div>



<a name="223966117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223966117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223966117">(Jan 25 2021 at 21:54)</a>:</h4>
<p>I believe so. Unfortunately that requires full const generics</p>



<a name="223966229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223966229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223966229">(Jan 25 2021 at 21:55)</a>:</h4>
<p>This offers the ability to smoothly compile x86 shuffles with immediate arguments, but many ISAs currently offer a fully "dynamic" shuffle that would look more like...</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="n">simd_shuffle</span><span class="p">(</span><span class="n">v1</span>: <span class="nc">S</span><span class="p">,</span><span class="w"> </span><span class="n">v2</span>: <span class="nc">S</span><span class="p">,</span><span class="w"> </span><span class="n">arr</span>: <span class="p">[</span><span class="n">X</span><span class="p">;</span><span class="w"> </span><span class="n">Y</span><span class="p">])</span><span class="w"> </span>-&gt; <span class="nc">S</span><span class="w"></span>
<span class="n">v1</span><span class="p">.</span><span class="n">shuffle</span><span class="p">(</span><span class="n">v2</span><span class="p">,</span><span class="w"> </span><span class="n">shuffle</span><span class="p">)</span><span class="w"></span>
</code></pre></div>



<a name="223966344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223966344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223966344">(Jan 25 2021 at 21:56)</a>:</h4>
<p>It would probably make sense for them to be separate functions</p>



<a name="223966639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223966639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223966639">(Jan 25 2021 at 21:58)</a>:</h4>
<p>Right, it's probably fine if we just use different functions here, just That's Also A Choice.<br>
I think sometimes people call one of these swizzling and one of these shuffling but I have no idea if there's a strict pattern to that to follow, so uh lol</p>



<a name="223966806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223966806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223966806">(Jan 25 2021 at 22:00)</a>:</h4>
<p>by "full const generics" do you mean "it requires const wellformedness"? My impression is that it does require more than minimum const generics but const wf is closer at hand than other forms of const generic features.</p>



<a name="223967011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967011">(Jan 25 2021 at 22:00)</a>:</h4>
<p>I just meant generally it doesn't use min_const_generics</p>



<a name="223967108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967108">(Jan 25 2021 at 22:00)</a>:</h4>
<p>Oh yeah.<br>
I think that's fine for our purposes.</p>



<a name="223967142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967142">(Jan 25 2021 at 22:01)</a>:</h4>
<p>Yeah probably</p>



<a name="223967210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967210">(Jan 25 2021 at 22:01)</a>:</h4>
<p>the docs team meeting ran long but yall have my full attention now, in the last -1 minutes of the meeting</p>



<a name="223967270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967270">(Jan 25 2021 at 22:01)</a>:</h4>
<p>Oh hey Lokathor!</p>



<a name="223967394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967394">(Jan 25 2021 at 22:01)</a>:</h4>
<p>I would only consider it to be a problem if it was a blocker to stabilization. I'd rather have the nice API using generics than some bodge.</p>



<a name="223967502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967502">(Jan 25 2021 at 22:02)</a>:</h4>
<p>(I'm here too but mostly lurking. Most of this is overmy head - for now.)</p>



<a name="223967679"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967679" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967679">(Jan 25 2021 at 22:03)</a>:</h4>
<p>wait why are full const generics neede for the shuffle?</p>



<a name="223967759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967759">(Jan 25 2021 at 22:03)</a>:</h4>
<p>If the const argument is an array</p>



<a name="223967821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223967821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223967821">(Jan 25 2021 at 22:03)</a>:</h4>
<p>They would require "const wellformedness" to guarantee that they actually are within bounds and satisfy other constraints.</p>



<a name="223968084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968084">(Jan 25 2021 at 22:04)</a>:</h4>
<p>hm, sorta</p>



<a name="223968092"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968092" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968092">(Jan 25 2021 at 22:04)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span> Please feel free to ask questions! If they are relatively simple to answer it is possible to do so with little overhead, and it might help clarify things for everyone involved. If you ask something we can't toss off a quick answer to, it can be answered later.</p>



<a name="223968160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968160">(Jan 25 2021 at 22:05)</a>:</h4>
<p><span class="user-mention silent" data-user-id="224471">Lokathor</span> <a href="#narrow/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting/near/223968084">said</a>:</p>
<blockquote>
<p>hm, sorta</p>
</blockquote>
<p>sorta? <span aria-label="eyes" class="emoji emoji-1f440" role="img" title="eyes">:eyes:</span></p>



<a name="223968177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968177">(Jan 25 2021 at 22:05)</a>:</h4>
<p>you can just accept excessive inputs and take only the lowest X bits from each input arg, which is sorta how they're claimed to work in the first place</p>



<a name="223968289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968289">(Jan 25 2021 at 22:05)</a>:</h4>
<p>I'm not sure what that means</p>



<a name="223968290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968290">(Jan 25 2021 at 22:05)</a>:</h4>
<p>dunno if min_const_generics lets us use arrays of integers, but i don't think so</p>



<a name="223968312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968312">(Jan 25 2021 at 22:06)</a>:</h4>
<p>It does not</p>



<a name="223968367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968367">(Jan 25 2021 at 22:06)</a>:</h4>
<p>Unfortunately</p>



<a name="223968408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968408">(Jan 25 2021 at 22:06)</a>:</h4>
<p>oof.</p>



<a name="223968487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968487">(Jan 25 2021 at 22:06)</a>:</h4>
<p>so like, say you have a f32x4, and you go to shuffle it, your lanes have to be 2 bits each. if someone puts in 5, that just takes the low 2 bits, the value effectively "wraps" back to 1</p>



<a name="223968587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968587">(Jan 25 2021 at 22:07)</a>:</h4>
<p>I haven't checked in on const generics in a while, but my understanding is that they were breaking up the const generics into subfeatures so that they could stabilize what they could stabilize as they go.</p>



<a name="223968646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968646">(Jan 25 2021 at 22:07)</a>:</h4>
<p>yeah, min_const_generics is already riding the train to 1.51, i've got a crate lined up and everything</p>



<a name="223968911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223968911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223968911">(Jan 25 2021 at 22:08)</a>:</h4>
<p>Right, I mean even moreso with features like const_generic_floats (or something like that) and such.</p>



<a name="223969610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223969610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223969610">(Jan 25 2021 at 22:12)</a>:</h4>
<p>So I think that seeing const_generic_arrays or whatever feature we might require is actually more plausible than not.</p>



<a name="223969616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223969616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223969616">(Jan 25 2021 at 22:12)</a>:</h4>
<p>Looks like maybe there should be a function like shuffle_u8 which takes a (generic length) u8 vector for a dynamic shuffle</p>



<a name="223969683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223969683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223969683">(Jan 25 2021 at 22:12)</a>:</h4>
<p>If we can, I'd like shuffle's semantics to <em>not</em> rely on vector lengths being powers-of-2 (required for masking), so can we have some other semantics please?</p>



<a name="223969689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223969689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223969689">(Jan 25 2021 at 22:12)</a>:</h4>
<p>And then a function "shuffle" which just takes a const usize argument or something</p>



<a name="223969823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223969823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223969823">(Jan 25 2021 at 22:13)</a>:</h4>
<p><span class="user-mention" data-user-id="312331">@Caleb Zulawski</span> Can you elaborate how that looks a bit more?</p>



<a name="223970026"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223970026" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223970026">(Jan 25 2021 at 22:14)</a>:</h4>
<p><span class="user-mention" data-user-id="229517">@Jacob Lifshay</span> Have the proposed <em>shuffle</em> APIs been reliant on powers of 2 in some way I've not noticed? I thought we just required current SIMD types to line up.</p>



<a name="223970062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223970062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223970062">(Jan 25 2021 at 22:14)</a>:</h4>
<p>how about just panicking, which is similar to what you'd get if you did <code>let a: [u8; 4] = ...; a[6]</code></p>



<a name="223970276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223970276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223970276">(Jan 25 2021 at 22:15)</a>:</h4>
<p>it's the ignoring upper bits in the shuffle's const argument, masking off the top bits only works if the vector length is a power-of-2</p>



<a name="223970523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223970523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223970523">(Jan 25 2021 at 22:17)</a>:</h4>
<p>ahh, yeah.<br>
I think ideally we would just use const wellformedness instead, but honestly, my understanding is that the RISCVV arch doesn't differentiate between "const" and "dynamic" shuffles in terms of runtime? would SimpleV?</p>



<a name="223970545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223970545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223970545">(Jan 25 2021 at 22:17)</a>:</h4>
<p>since you get actual-lane-index = const-argument % vec-len which translates to actual-lane-index = const-argument &amp; (vec-len - 1) if vec-len is a power of 2</p>



<a name="223970601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223970601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223970601">(Jan 25 2021 at 22:17)</a>:</h4>
<div class="codehilite"><pre><span></span><code>impl&lt;const N: usize&gt; SimdF32 {
    pub fn shuffle&lt;const M: usize, const Indices: [usize; M]&gt;(self, other: Self) -&gt; SimdF32&lt;M&gt; { ... }
    pub fn shuffle_usize&lt;const M: usize&gt;(self, other: Self, indices: SimdUsize&lt;M&gt;) -&gt; SimdF32&lt;M&gt; { ... }
}
</code></pre></div>



<a name="223970997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223970997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223970997">(Jan 25 2021 at 22:19)</a>:</h4>
<p>SimpleV (the new vectors for PowerPC) does support constant shuffles more efficiently, since it can address registers part-way through the vector since a vector is just a range of consecutive registers</p>



<a name="223971088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971088">(Jan 25 2021 at 22:20)</a>:</h4>
<p>also, there are some special shuffle instructions</p>



<a name="223971112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971112">(Jan 25 2021 at 22:20)</a>:</h4>
<p>Ah OK, then I withdraw my lamentation partly.</p>



<a name="223971114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971114">(Jan 25 2021 at 22:20)</a>:</h4>
<p>I would vote for panicking or UB for out of range indices</p>



<a name="223971147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971147">(Jan 25 2021 at 22:20)</a>:</h4>
<p>Probably with a checked and unchecked variant of the function</p>



<a name="223971189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971189">(Jan 25 2021 at 22:21)</a>:</h4>
<p>Though if we could guarantee behavior without panicking that would be nice</p>



<a name="223971240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971240">(Jan 25 2021 at 22:21)</a>:</h4>
<p>I imagine that's not possible since it's just architecture specific</p>



<a name="223971294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971294">(Jan 25 2021 at 22:22)</a>:</h4>
<p>at the LLVM IR level, out of range indexes become undef elements iirc</p>



<a name="223971305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971305">(Jan 25 2021 at 22:22)</a>:</h4>
<p>I think for const indices we should compile error ideally, and for dynamic anything we can either say panic or provide an <code>unsafe shuffle_YOLO</code></p>



<a name="223971328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971328">(Jan 25 2021 at 22:22)</a>:</h4>
<p>Undef meaning UB to access?</p>



<a name="223971364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971364">(Jan 25 2021 at 22:22)</a>:</h4>
<p>Yeah I think we're all in agreement</p>



<a name="223971377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971377">(Jan 25 2021 at 22:23)</a>:</h4>
<p>undef being <code>MaybeUninit::uninit()</code></p>



<a name="223971403"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971403" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971403">(Jan 25 2021 at 22:23)</a>:</h4>
<p>I'm OK with slightly constraining shuffles to fit within architectural bounds here.</p>



<a name="223971416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971416">(Jan 25 2021 at 22:23)</a>:</h4>
<p>if it makes the API cleaner, basically.</p>



<a name="223971446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971446">(Jan 25 2021 at 22:23)</a>:</h4>
<p>though I'd have to double check, the shuffle may instead produce poison, which is UB to access</p>



<a name="223971538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971538">(Jan 25 2021 at 22:24)</a>:</h4>
<p>I'm ok with saying it's UB regardless of what LLVM does</p>



<a name="223971565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971565">(Jan 25 2021 at 22:24)</a>:</h4>
<p>I don't think cranelift necessarily needs to match every quirk of LLVM</p>



<a name="223971585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971585">(Jan 25 2021 at 22:25)</a>:</h4>
<p>And who knows what it does/will do</p>



<a name="223971612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971612">(Jan 25 2021 at 22:25)</a>:</h4>
<p>Oh, so shuffle_usize is for producing a variable-length vector?</p>



<a name="223971621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971621">(Jan 25 2021 at 22:25)</a>:</h4>
<p>Yes</p>



<a name="223971650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971650">(Jan 25 2021 at 22:25)</a>:</h4>
<p>They actually both can change the length of the vector</p>



<a name="223971715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971715">(Jan 25 2021 at 22:26)</a>:</h4>
<p>Though typically I assume you will want the same size</p>



<a name="223971829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971829">(Jan 25 2021 at 22:27)</a>:</h4>
<p>...OK, not sure what shuffle_u8 would be for!</p>



<a name="223971849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223971849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223971849">(Jan 25 2021 at 22:27)</a>:</h4>
<p>so, llvm IR only has a const shuffle, dynamic shuffle would probably have to use cpu-specific intrinsics. llvm probably assumes element indexes are in-range since they are a constant, but it doesn't say for sure.</p>



<a name="223972038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972038">(Jan 25 2021 at 22:29)</a>:</h4>
<p>...ah. Then I think we are implicitly moving dynamic shuffles to the back burner by comparison and assuming const shuffles for right now until we have more support out of rustc itself.</p>



<a name="223972042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972042">(Jan 25 2021 at 22:29)</a>:</h4>
<p><span class="user-mention" data-user-id="281757">@Jubilee</span> shuffling within a very small range of the vector? Not sure either.</p>



<a name="223972244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972244">(Jan 25 2021 at 22:31)</a>:</h4>
<p>I'm ok with that. I think const shuffles overall are more common</p>



<a name="223972308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972308">(Jan 25 2021 at 22:32)</a>:</h4>
<p>speaking of, byte permutations are another weird shuffle intrinsic that a lot of arches support, I think even Intel does now but with AVX512? but I'm not sure if that's meaningfully different from "treat SIMD type as a u8xN now, then do shuffle ops".</p>



<a name="223972357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972357">(Jan 25 2021 at 22:32)</a>:</h4>
<p>from the perspective of in-lang semantics</p>



<a name="223972378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972378">(Jan 25 2021 at 22:32)</a>:</h4>
<p>Yeah, probably not</p>



<a name="223972404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972404">(Jan 25 2021 at 22:32)</a>:</h4>
<p>That's probably a safe-transmute issue</p>



<a name="223972572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972572">(Jan 25 2021 at 22:34)</a>:</h4>
<p>Thanks a lot @jubilee. <br>
I'd like to tackle <a href="https://github.com/rust-lang/stdsimd/issues/54">https://github.com/rust-lang/stdsimd/issues/54</a> as my first contribution.<br>
I've </p>
<ul>
<li>checked out the contributing guide</li>
<li>read the beginner's guide to SIMD markdown file in the repo<br>
I'm looking at the code of <code>neg</code> <a href="https://github.com/rust-lang/stdsimd/blob/a69c4414bc69d95d1ac1636cf2bc61deec21d936/crates/core_simd/tests/ops_impl/float_macros.rs#L298">here</a> but would appreciate some pointers before diving in.</li>
</ul>



<a name="223972632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972632">(Jan 25 2021 at 22:35)</a>:</h4>
<p>and now my brain finally caught up: shuffle_usize is for dynamic indices, but still needs a statically known vector length. right, OK.</p>



<a name="223972696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972696">(Jan 25 2021 at 22:36)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span> I think that one is a relatively straightforward fix once you find the operator implementations. The PR I mentioned in a comment is merged so nothing should be blocking it</p>



<a name="223972816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972816">(Jan 25 2021 at 22:37)</a>:</h4>
<p>If you run into any problems you can just ping us here</p>



<a name="223972850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972850">(Jan 25 2021 at 22:37)</a>:</h4>
<p>Ok, that sounds good <span class="user-mention" data-user-id="312331">@Caleb Zulawski</span> thanks for that.</p>



<a name="223972853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223972853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223972853">(Jan 25 2021 at 22:37)</a>:</h4>
<p>Yeah, that is the test file for that, you mentioned you haven't looked at macros before so I suggest keeping <a href="https://cheats.rs/#macros-attributes">https://cheats.rs/#macros-attributes</a> close at hand because that is always what I first open when I start fiddling with macros. ^^;</p>



<a name="223973209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223973209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223973209">(Jan 25 2021 at 22:41)</a>:</h4>
<p>You will find most of the float vector code over here: <del>https://github.com/rust-lang/stdsimd/blob/a69c4414bc69d95d1ac1636cf2bc61deec21d936/crates/core_simd/src/macros.rs#L273-L315</del></p>
<p><a href="https://github.com/rust-lang/stdsimd/blob/master/crates/core_simd/src/macros.rs">https://github.com/rust-lang/stdsimd/blob/master/crates/core_simd/src/macros.rs</a></p>



<a name="223973211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223973211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223973211">(Jan 25 2021 at 22:41)</a>:</h4>
<p>Ah, I was looking at the test file -_-</p>



<a name="223973244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223973244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223973244">(Jan 25 2021 at 22:41)</a>:</h4>
<p>I thought it was just you exhibiting good practice, you know, look at the tests first. :^)</p>



<a name="223973634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223973634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223973634">(Jan 25 2021 at 22:45)</a>:</h4>
<p><a href="https://github.com/rust-lang/stdsimd/blob/master/crates/core_simd/src/ops.rs">https://github.com/rust-lang/stdsimd/blob/master/crates/core_simd/src/ops.rs</a></p>



<a name="223973657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223973657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223973657">(Jan 25 2021 at 22:45)</a>:</h4>
<p>This is where the ops themselves are</p>



<a name="223973686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223973686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223973686">(Jan 25 2021 at 22:45)</a>:</h4>
<p>A maze of twisty little files, all alike.</p>



<a name="223973701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223973701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223973701">(Jan 25 2021 at 22:45)</a>:</h4>
<p><span class="user-mention" data-user-id="281757">@Jubilee</span> I think that revision you linked is pre-const-generics</p>



<a name="223973765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223973765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223973765">(Jan 25 2021 at 22:46)</a>:</h4>
<p>oh simd</p>



<a name="223974280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223974280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223974280">(Jan 25 2021 at 22:51)</a>:</h4>
<p>yeah, that was a few revisions ago, whoops. <a href="https://github.com/rust-lang/stdsimd/blob/master/crates/core_simd/src/macros.rs">https://github.com/rust-lang/stdsimd/blob/master/crates/core_simd/src/macros.rs</a></p>



<a name="223975958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223975958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223975958">(Jan 25 2021 at 23:07)</a>:</h4>
<p>Is it alright to ask newbie questions here?<br>
I've downloaded the repo, <code>cargo test</code> passes all tests, but I read I may have to mainpulate the <code>RUSTFLAGS</code> to test specific instruction sets. <code>cargo test -- --target=+avx</code> but don't think that is on the right path...</p>



<a name="223976053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976053">(Jan 25 2021 at 23:08)</a>:</h4>
<p>It's not convenient, but you can look at what the automated testing does</p>



<a name="223976135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976135">(Jan 25 2021 at 23:09)</a>:</h4>
<p><a href="https://github.com/rust-lang/stdsimd/blob/master/.github/workflows/ci.yml#L71">https://github.com/rust-lang/stdsimd/blob/master/.github/workflows/ci.yml#L71</a></p>



<a name="223976139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976139">(Jan 25 2021 at 23:09)</a>:</h4>
<p>Maybe not the best example</p>



<a name="223976240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976240">(Jan 25 2021 at 23:10)</a>:</h4>
<p>You can set RUSTFLAGS=-Ctarget-cpu=native for an easy solution</p>



<a name="223976262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976262">(Jan 25 2021 at 23:10)</a>:</h4>
<p><code>export RUSTFFLAGS=-Ctarget-cpu=native</code> seems to work.</p>



<a name="223976276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976276">(Jan 25 2021 at 23:11)</a>:</h4>
<p>Ah, beat me to it <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="223976277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976277">(Jan 25 2021 at 23:11)</a>:</h4>
<p>(though for this particular issue I don't think you need to set any features, I never really do)</p>



<a name="223976369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976369">(Jan 25 2021 at 23:12)</a>:</h4>
<p>OK. I'm on 1.51.0-nightly right now - is that prudent for working on my branch?</p>



<a name="223976413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976413">(Jan 25 2021 at 23:13)</a>:</h4>
<p>Yup. I update nightly every once in a while for this just in case something changes</p>



<a name="223976599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223976599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223976599">(Jan 25 2021 at 23:15)</a>:</h4>
<p>OK, I think I should be all set for firing all the footguns <span aria-label="sunglasses" class="emoji emoji-1f60e" role="img" title="sunglasses">:sunglasses:</span></p>



<a name="223977210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223977210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223977210">(Jan 25 2021 at 23:23)</a>:</h4>
<p>Ok, so grokking this lib - there is just an unholy amount of macros to reimplement the basic ops on all the permutations of lanes x vector sizes x numeric types, right?</p>



<a name="223978219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223978219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223978219">(Jan 25 2021 at 23:34)</a>:</h4>
<p>Correct.<br>
And const generics is the version with <em>less</em> macros.</p>



<a name="223978433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223978433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223978433">(Jan 25 2021 at 23:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="312331">Caleb Zulawski</span> <a href="#narrow/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting/near/223973634">said</a>:</p>
<blockquote>
<p><a href="https://github.com/rust-lang/stdsimd/blob/master/crates/core_simd/src/ops.rs">https://github.com/rust-lang/stdsimd/blob/master/crates/core_simd/src/ops.rs</a></p>
</blockquote>
<p>OK so the mission, should I choose to accept it, is to dive into the problematic ops from the github issue that are found in the link above, sprinkle in some <code>match</code>es to <code>panic!</code> in the problematic cases, and make sure that appropriate tests get added to test for the regression.<br>
Right?</p>



<a name="223978552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223978552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ashley Mannix <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223978552">(Jan 25 2021 at 23:38)</a>:</h4>
<p>Hey all! It’s a public holiday here so ended up having a sleep in 😅 Catching up now. I’ll kick off crater if it hasn’t been done already</p>



<a name="223980689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223980689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223980689">(Jan 26 2021 at 00:04)</a>:</h4>
<p><span class="user-mention" data-user-id="312331">@Caleb Zulawski</span> Shouldn't the first three overflow in release? I assume we mean "in debug conditions"?</p>



<a name="223980740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223980740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223980740">(Jan 26 2021 at 00:05)</a>:</h4>
<p>OK gang, I'm submitting a very, very rough WIP PR to get a hang of contributing here.<br>
Thanks a lot for answering many of my questions already - I look forward to seeing some good progress.</p>



<a name="223980782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223980782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223980782">(Jan 26 2021 at 00:06)</a>:</h4>
<p><a href="https://github.com/rust-lang/stdsimd/pull/55">https://github.com/rust-lang/stdsimd/pull/55</a></p>



<a name="223980818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223980818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223980818">(Jan 26 2021 at 00:06)</a>:</h4>
<p>I think I will ask silly Rust questions here if no one objects and specific design stuff over on the PR. <br>
Gotta bounce for a bit, see ya soon. <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span></p>



<a name="223981186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223981186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223981186">(Jan 26 2021 at 00:11)</a>:</h4>
<p><span class="user-mention" data-user-id="281757">@Jubilee</span> I'm not sure, now that I think of it.  If we want them to do that we need to modify rustc. Were there any reasons we didn't want that?</p>



<a name="223981215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223981215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223981215">(Jan 26 2021 at 00:12)</a>:</h4>
<p>Oh, div/rem with overflow do panic. Cool, didn't know that.</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">for</span><span class="w"> </span><span class="n">i</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="o">-</span><span class="mi">1</span><span class="k">i32</span><span class="o">..</span><span class="mi">1</span><span class="k">i32</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="fm">println!</span><span class="p">(</span><span class="s">"{}"</span><span class="p">,</span><span class="w"> </span><span class="kt">i32</span>::<span class="n">MIN</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">i</span><span class="p">);</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>just prints</p>
<div class="codehilite"><pre><span></span><code>2147483647
-2147483648
</code></pre></div>
<p>which is kinda what I expected, but the divide and remainder operations trigger panics.</p>



<a name="223981362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223981362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223981362">(Jan 26 2021 at 00:13)</a>:</h4>
<p>I think I'm ok with rem and div having unconditional extra branching since they're unsafe-ish ops in the first place</p>



<a name="223981440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223981440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223981440">(Jan 26 2021 at 00:14)</a>:</h4>
<p>I took these examples directly from LLVM's lang ref which says it's UB to do it</p>



<a name="223981544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223981544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223981544">(Jan 26 2021 at 00:15)</a>:</h4>
<p>I'm not sure if very many architectures even have vectorized integer div or rem</p>



<a name="223981955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223981955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223981955">(Jan 26 2021 at 00:20)</a>:</h4>
<p>Yeah, I'm fine with that, I just wanted to doublecheck things because it made me go "???" internally.</p>



<a name="223986424"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223986424" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223986424">(Jan 26 2021 at 01:19)</a>:</h4>
<p>Does that mean it's not a good idea for my PR to implement a branch?</p>



<a name="223986668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223986668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223986668">(Jan 26 2021 at 01:23)</a>:</h4>
<p>No, go ahead and do it</p>



<a name="223988470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223988470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223988470">(Jan 26 2021 at 01:50)</a>:</h4>
<p>And we are on Crater now. <a href="https://crater.rust-lang.org/ex/pr-80652">https://crater.rust-lang.org/ex/pr-80652</a></p>



<a name="223988728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223988728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223988728">(Jan 26 2021 at 01:55)</a>:</h4>
<p>Given the wait times for the others, we may be waiting a bit, but hopefully we'll see results by next week. We uh... may not, because it may take 8 days, looking at my napkin math. lol. Well.</p>



<a name="223991459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223991459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223991459">(Jan 26 2021 at 02:46)</a>:</h4>
<p>Newbie question - what does crater add to the project?</p>



<a name="223991587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223991587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223991587">(Jan 26 2021 at 02:49)</a>:</h4>
<p>Crater basically tests the compiler on a huge number of crates so you can see if anything broke</p>



<a name="223991659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223991659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223991659">(Jan 26 2021 at 02:50)</a>:</h4>
<p>My PR changes how the #[repr(simd)] attribute works and some code could potentially now not work, so we want to make sure no one is relying on that. Or at least let them know why it's changing and how to fix it</p>



<a name="223991670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223991670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223991670">(Jan 26 2021 at 02:51)</a>:</h4>
<p><span class="user-mention" data-user-id="246783">@Miguel Raz Guzmán Macedo</span> So, a crater run is mostly because it's a compiler PR. It's possible to just ship changes into nightly and wait and see if anyone yells, but that's not really as exhaustive as actually having the compiler's try-commit attempt to compile every single crate on <a href="http://crates.io">crates.io</a></p>



<a name="223992010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223992010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223992010">(Jan 26 2021 at 02:57)</a>:</h4>
<p>Most of stdsimd issues, like the one you adopted, only require changes to core::simd's library code. Unfortunately we've run into a lot of different bugs because the previous attempts to implement various SIMD APIs in Rust never really resolved to "Rust is good at SIMD now and everything is stable!" so it requires compiler commits and will likely require breaking changes, and while nightly is unstable, unfortunately it's also like... a situation where SIMD code in the wild is often relying on nightly rustc's current best-effort attempts and it is Very Rude to break them at the moment, so running into a situation where it's an obvious possible breakage merits caution.</p>



<a name="223992747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223992747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223992747">(Jan 26 2021 at 03:11)</a>:</h4>
<p>Oh nice! Thanks for the tips. <br>
Sounds like the term crater run is videogame related...</p>



<a name="223992822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223992822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Miguel Raz Guzmán Macedo <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223992822">(Jan 26 2021 at 03:13)</a>:</h4>
<p>Oh, ouch for the brave souls living on nightly when you change internals for SIMD.</p>



<a name="223993266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/2021-01-25%20Meeting/near/223993266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/2021-01-25.20Meeting.html#223993266">(Jan 26 2021 at 03:22)</a>:</h4>
<p>this conversation can probably continue over here <a href="#narrow/stream/257879-project-portable-simd/topic/MGR.20opens.20a.20PR!.20(issue.20.2354)">https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/MGR.20opens.20a.20PR!.20(issue.20.2354)</a><br>
since uh meeting is over even though I never formally called it. <strong>cough</strong></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>